package tech.xs.sys.dao;

import com.github.yulichang.base.MPJBaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import tech.xs.sys.domain.entity.SysUserRole;

import java.util.Set;

public interface SysUserRoleDao extends MPJBaseMapper<SysUserRole> {

    @Select("select role_code from sys_user_role left join sys_role on sys_user_role.role_code = sys_role.code " +
            "where sys_user_role.user_name = #{userName}")
    Set<String> selectRoleCodesByUserName(@Param(value = "userName") String userName);

}
